home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 October: Mac OS SDK / Dev.CD Oct 96 SDK / Dev.CD Oct 96 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / Framewrk / FWWindow / Include / FWFloWin.h next >
Encoding:
Text File  |  1996-08-16  |  3.4 KB  |  128 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWFloWin.h
  4. //    Release Version:    $ ODF 1 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9. //
  10. //    FW_CFloatWindow: Wrapper for a floating ODWindow.
  11. //    
  12. //        The creation of a FW_CFloatingWindow works differently from FW_CWindow. Usually in your
  13. //        part Initialize method your directly create the floating windows you need.
  14. //        
  15. //        void CMyPart::Initialize()
  16. //        {
  17. //                ...
  18. //                fPaletteWindow = new FW_CFloatingWindow(....);
  19. //                ...
  20. //        }
  21. //
  22. //        Floating windows are created hidden. You can call FW_CWindow::Show() or FW_CWindow::Hide() to 
  23. //        show/Hide your floating windows. When your part is desactivated/activated, the visible floating windows 
  24. //        will be automatically hidden/shown.
  25. //
  26. //        Floating window have to be deleted in your ReleaseAll method
  27. //    
  28.  
  29. #ifndef FWFLOWIN_H
  30. #define FWFLOWIN_H
  31.  
  32. #ifndef FWTCOLL_H
  33. #include "FWTColl.h"
  34. #endif
  35.  
  36. #ifndef FWWINDOW_H
  37. #include "FWWindow.h"
  38. #endif
  39.  
  40. #ifndef FWBNDSTR_H
  41. #include "FWBndStr.h"
  42. #endif
  43.  
  44. // ----- OpenDoc Includes -----
  45.  
  46. #ifndef FWODTYPS_H
  47. #include "FWODTyps.h"
  48. #endif
  49.  
  50. //========================================================================================
  51. //    Forward Declarations
  52. //========================================================================================
  53.  
  54. class ODPart;
  55. class ODWindowState;
  56. class FW_CPrivSharedWindow;
  57. struct FW_SWindowParameters;
  58. class FW_CPart;
  59. class FW_CFrame;
  60. class FW_CPresentation;
  61.  
  62.  
  63.  
  64. //========================================================================================
  65. //    class FW_CFloatingWindow
  66. //========================================================================================
  67.  
  68. class FW_CFloatingWindow : public FW_CWindow
  69. {
  70. public:
  71.     FW_DECLARE_CLASS
  72.  
  73. //----------------------------------------------------------------------------------------
  74. //    Constructors/Destructor
  75. //
  76. public:
  77.     FW_CFloatingWindow(Environment* ev, 
  78.                         FW_CPart* part,
  79.                         FW_CPresentation* presentation,
  80.                         const FW_CString& windowTitle,
  81.                         const FW_CPoint& interiorSize,
  82.                         const FW_CPoint& position,
  83.                         FW_Boolean hasCloseBox);
  84.  
  85.     virtual ~FW_CFloatingWindow();
  86.     
  87. //----------------------------------------------------------------------------------------
  88. //    Inherited API
  89. //
  90. public:
  91.     virtual FW_Boolean            IsFloating(Environment* ev) const;
  92.                                     
  93.     virtual ODID                GetID(Environment* ev) const;
  94.     virtual void                SetID(Environment* ev, ODID windowID);
  95.     
  96.     FW_CPart*                    GetPart(Environment*) const
  97.                                     {return fPart;}
  98.                                     
  99.     virtual ODWindow*            AcquireODWindow(Environment* ev) const;
  100.                                                 
  101. //----------------------------------------------------------------------------------------
  102. //    New API
  103. //
  104. public:
  105.     static void                 HideShowFloatingWindows(Environment *ev, 
  106.                                     ODWindowState* windowState, 
  107.                                     FW_Boolean state);
  108.                                         
  109.     static void                    TransferOwnership(Environment* ev, 
  110.                                         ODWindowState* windowState,
  111.                                         ODPart* newOwner);
  112.                                         
  113. //----------------------------------------------------------------------------------------
  114. //    Data Members
  115. //
  116. private:
  117.     FW_CPart*                    fPart;
  118.     ODTypeToken                    fPresentation;
  119.     FW_CPrivSharedWindow*        fSharedWindow;
  120.     FW_SWindowParameters*        fWindowParameters;
  121.     FW_CFrame*                    fRootFrame;
  122.     
  123. protected:
  124.     static FW_TOrderedCollection<FW_CPrivSharedWindow>*    gSharedWindows;
  125. };
  126.  
  127. #endif
  128.